Optimal. Leaf size=110 \[ \frac{d \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )^2}{4 b e g}+x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )-n x (a g+b f)-\frac{2 b g n (d+e x) \log \left (c (d+e x)^n\right )}{e}+2 b g n^2 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.222167, antiderivative size = 130, normalized size of antiderivative = 1.18, number of steps used = 11, number of rules used = 5, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.172, Rules used = {2430, 2411, 2346, 2301, 2295} \[ x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )+\frac{d g \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 b e}-a g n x+\frac{b d \left (g \log \left (c (d+e x)^n\right )+f\right )^2}{2 e g}-\frac{2 b g n (d+e x) \log \left (c (d+e x)^n\right )}{e}-b f n x+2 b g n^2 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2430
Rule 2411
Rule 2346
Rule 2301
Rule 2295
Rubi steps
\begin{align*} \int \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx &=x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )-(b e n) \int \frac{x \left (f+g \log \left (c (d+e x)^n\right )\right )}{d+e x} \, dx-(e g n) \int \frac{x \left (a+b \log \left (c (d+e x)^n\right )\right )}{d+e x} \, dx\\ &=x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )-(b n) \operatorname{Subst}\left (\int \frac{\left (-\frac{d}{e}+\frac{x}{e}\right ) \left (f+g \log \left (c x^n\right )\right )}{x} \, dx,x,d+e x\right )-(g n) \operatorname{Subst}\left (\int \frac{\left (-\frac{d}{e}+\frac{x}{e}\right ) \left (a+b \log \left (c x^n\right )\right )}{x} \, dx,x,d+e x\right )\\ &=x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )-\frac{(b n) \operatorname{Subst}\left (\int \left (f+g \log \left (c x^n\right )\right ) \, dx,x,d+e x\right )}{e}+\frac{(b d n) \operatorname{Subst}\left (\int \frac{f+g \log \left (c x^n\right )}{x} \, dx,x,d+e x\right )}{e}-\frac{(g n) \operatorname{Subst}\left (\int \left (a+b \log \left (c x^n\right )\right ) \, dx,x,d+e x\right )}{e}+\frac{(d g n) \operatorname{Subst}\left (\int \frac{a+b \log \left (c x^n\right )}{x} \, dx,x,d+e x\right )}{e}\\ &=-b f n x-a g n x+\frac{d g \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 b e}+x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+\frac{b d \left (f+g \log \left (c (d+e x)^n\right )\right )^2}{2 e g}-2 \frac{(b g n) \operatorname{Subst}\left (\int \log \left (c x^n\right ) \, dx,x,d+e x\right )}{e}\\ &=-b f n x-a g n x+\frac{d g \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 b e}+x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+\frac{b d \left (f+g \log \left (c (d+e x)^n\right )\right )^2}{2 e g}-2 \left (-b g n^2 x+\frac{b g n (d+e x) \log \left (c (d+e x)^n\right )}{e}\right )\\ \end{align*}
Mathematica [A] time = 0.0235027, size = 76, normalized size = 0.69 \[ \frac{(d+e x) (a g+b (f-2 g n)) \log \left (c (d+e x)^n\right )+e x (a (f-g n)+b n (2 g n-f))+b g (d+e x) \log ^2\left (c (d+e x)^n\right )}{e} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.086, size = 156, normalized size = 1.4 \begin{align*} xaf+xag\ln \left ( c \left ( ex+d \right ) ^{n} \right ) -agnx+{\frac{dnag\ln \left ( ex+d \right ) }{e}}+xb\ln \left ( c \left ( ex+d \right ) ^{n} \right ) f-bfnx+{\frac{bdfn\ln \left ( ex+d \right ) }{e}}+bgx \left ( \ln \left ( c{{\rm e}^{n\ln \left ( ex+d \right ) }} \right ) \right ) ^{2}+{\frac{bdg \left ( \ln \left ( c{{\rm e}^{n\ln \left ( ex+d \right ) }} \right ) \right ) ^{2}}{e}}+2\,bg{n}^{2}x-2\,{\frac{bdg{n}^{2}\ln \left ( ex+d \right ) }{e}}-2\,nbgx\ln \left ( c{{\rm e}^{n\ln \left ( ex+d \right ) }} \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.12809, size = 223, normalized size = 2.03 \begin{align*} -b e f n{\left (\frac{x}{e} - \frac{d \log \left (e x + d\right )}{e^{2}}\right )} - a e g n{\left (\frac{x}{e} - \frac{d \log \left (e x + d\right )}{e^{2}}\right )} + b g x \log \left ({\left (e x + d\right )}^{n} c\right )^{2} + b f x \log \left ({\left (e x + d\right )}^{n} c\right ) + a g x \log \left ({\left (e x + d\right )}^{n} c\right ) -{\left (2 \, e n{\left (\frac{x}{e} - \frac{d \log \left (e x + d\right )}{e^{2}}\right )} \log \left ({\left (e x + d\right )}^{n} c\right ) + \frac{{\left (d \log \left (e x + d\right )^{2} - 2 \, e x + 2 \, d \log \left (e x + d\right )\right )} n^{2}}{e}\right )} b g + a f x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.91864, size = 365, normalized size = 3.32 \begin{align*} \frac{b e g x \log \left (c\right )^{2} +{\left (b e g n^{2} x + b d g n^{2}\right )} \log \left (e x + d\right )^{2} -{\left (2 \, b e g n - b e f - a e g\right )} x \log \left (c\right ) +{\left (2 \, b e g n^{2} + a e f -{\left (b e f + a e g\right )} n\right )} x -{\left (2 \, b d g n^{2} -{\left (b d f + a d g\right )} n +{\left (2 \, b e g n^{2} -{\left (b e f + a e g\right )} n\right )} x - 2 \,{\left (b e g n x + b d g n\right )} \log \left (c\right )\right )} \log \left (e x + d\right )}{e} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.44923, size = 257, normalized size = 2.34 \begin{align*} \begin{cases} \frac{a d g n \log{\left (d + e x \right )}}{e} + a f x + a g n x \log{\left (d + e x \right )} - a g n x + a g x \log{\left (c \right )} + \frac{b d f n \log{\left (d + e x \right )}}{e} + \frac{b d g n^{2} \log{\left (d + e x \right )}^{2}}{e} - \frac{2 b d g n^{2} \log{\left (d + e x \right )}}{e} + \frac{2 b d g n \log{\left (c \right )} \log{\left (d + e x \right )}}{e} + b f n x \log{\left (d + e x \right )} - b f n x + b f x \log{\left (c \right )} + b g n^{2} x \log{\left (d + e x \right )}^{2} - 2 b g n^{2} x \log{\left (d + e x \right )} + 2 b g n^{2} x + 2 b g n x \log{\left (c \right )} \log{\left (d + e x \right )} - 2 b g n x \log{\left (c \right )} + b g x \log{\left (c \right )}^{2} & \text{for}\: e \neq 0 \\x \left (a + b \log{\left (c d^{n} \right )}\right ) \left (f + g \log{\left (c d^{n} \right )}\right ) & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.25506, size = 289, normalized size = 2.63 \begin{align*}{\left (x e + d\right )} b g n^{2} e^{\left (-1\right )} \log \left (x e + d\right )^{2} - 2 \,{\left (x e + d\right )} b g n^{2} e^{\left (-1\right )} \log \left (x e + d\right ) + 2 \,{\left (x e + d\right )} b g n e^{\left (-1\right )} \log \left (x e + d\right ) \log \left (c\right ) + 2 \,{\left (x e + d\right )} b g n^{2} e^{\left (-1\right )} +{\left (x e + d\right )} b f n e^{\left (-1\right )} \log \left (x e + d\right ) +{\left (x e + d\right )} a g n e^{\left (-1\right )} \log \left (x e + d\right ) - 2 \,{\left (x e + d\right )} b g n e^{\left (-1\right )} \log \left (c\right ) +{\left (x e + d\right )} b g e^{\left (-1\right )} \log \left (c\right )^{2} -{\left (x e + d\right )} b f n e^{\left (-1\right )} -{\left (x e + d\right )} a g n e^{\left (-1\right )} +{\left (x e + d\right )} b f e^{\left (-1\right )} \log \left (c\right ) +{\left (x e + d\right )} a g e^{\left (-1\right )} \log \left (c\right ) +{\left (x e + d\right )} a f e^{\left (-1\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]